package com.yld.ch02;





public class Client {
	
	
	public static void main(String[] args) {
		
		
		new ScottThread().start();
		new ScottThread().start();
		new ScottThread().start();
		
		
		
	}
	

}


class ScottThread extends  Thread {
	
	@SuppressWarnings("static-access")
	@Override
	public void run() {
		
		//线程 具体要做事情  写在 run方法中
		
		
		String  name="huanglaoshi";
		
		for(int index=0; index<name.length();index++){
			
			
			
			System.out.print(name.charAt(index));
			
			//每打印一个字符 让线程 休息10毫秒
			
			try {
				Thread.currentThread().sleep(1000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
		
		System.out.println();
		
	}
}

